package com.atguigu.juc.chap01;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @author Taeyang
 * @date 2025/3/31
 */
public class ReentrantDemo {

    public static synchronized void a() {
        System.out.println("a begin");
        b();
        System.out.println("a end");
    }

    public static synchronized void b() {
        System.out.println("b begin");
        System.out.println("b end");
    }

    public static void main(String[] args) {
        a();
    }
}
